1. Statement of the Technical Field
The present invention relates to the field of scalable distributed services, and more particularly to a staged event-driven architecture (SEDA).
2. Description of the Related Art
Scalable distributed services have become an important aspect of software design in the distributed software development field. In particular, the ability to scale a distributed application to process an enhanced load represents a significant challenge to the proliferation and popularization of distributed applications. In this regard, if the challenge is left unmet, the problem of scalability certainly will retard the growth of distributed software applications, including Internet based Web services. Accordingly, several performance optimizing technologies have been applied to the problem of distributed application scalability in order to address the foregoing challenge.
At the forefront of technological enhancements, the thread pooling concept has been applied to distributed application design so as to provide an enhanced level of concurrent processing of application tasks. Examples include the technologies disclosed in U.S. Pat. Nos. 6,427,161 B1, 6,377,939 and 5,991,792, in addition to United States Patent Application Publication Nos. US 2001/0018701 and US 2001/0005853, and Control of Dynamic Threads Pool for Concurrent Remote Procedure Calls, IBM Technical Disclosure Bulletin, Vol. 38, No. 05 (May 1995). In each of the foregoing publications, the number of threads available for use in a thread pool can be increased or decreased depending upon the load experienced in the application. Yet, the use of dynamically configured thread pools alone cannot overcome performance deficiencies experienced under particularly variable loads such as those experienced in an application server.
To that end, the staged event-driven architecture (SEDA) had been developed at the University of California, Berkeley to support massive concurrency demands while simplifying the construction of well-conditioned services. As documented in the seminal SEDA paper, Matt Welsh, David Culler, and Eric Brewer, SEDA: An Architecture for Well-Conditioned Callable Internet Services, in the Eightieth Symposium on Operating Systems Principles (SOSP-18), Chateau Lake Louise, Canada (Oct. 21-24, 2001), in SEDA, applications are configured with a series of interconnected, event-driven stages where each stage enjoys a coupling to a stage queue. Within each stage, a thread pool can be allocated to support processing within the stage. Through this unique combination of queued, event-driven stages and thread pools, services can be well-conditioned to load, preventing resources from being over-committed when demand exceeds service capacity.
In this regard, the SEDA design makes use of a set of dynamic resource controllers to keep stages within their specified operating range despite large fluctuations in load. More specifically, each resource controller can monitor the load experienced by an associated stage. When it is determined that the load has increased beyond a threshold level, the thread pool can be augmented. Conversely, when it is determined that the load has decreased, the number of threads in the thread pool can be reduced. Similarly, in respect to the batching of events in the event handler of the stage, the number of events processed by each iteration of the event handler can be adjusted based upon measured processing throughput.
As a result of the SEDA design, several prototypes have been assembled, including the Sandstorm™ application server which, though coded in the Java programming language, demonstrates performance which rivals that of C and C++ based application servers. Other prototype applications include the SSL and TLS protocol library, known in the art as “aTLS”, a Gnutella™ packet router, and Arashi™, a Web-based e-mail service similar to Yahoo!™ Mail. Finally, the Haboob™ high-performance Web server also incorporates a SEDA design which, in consequence of such design, outperforms both the Apache™ and Flash™ Web servers.